﻿CREATE PROCEDURE [dbo].[proc_Assets_UpdateXX_G]
	(	
	
		@Description nvarchar(500),		
		@Prices numeric(18,2),
		@DJUserName nvarchar(50),
		@DJDate datetime,
		@GGXH nvarchar(50),
		@GZDate datetime,
		@GId uniqueidentifier,
		@zcbh VARCHAR(50),
		@memo NVARCHAR(2000),
		@userid VARCHAR(30),
		@username_1 NVARCHAR(50),
		@NameId INT,
		@CategoryId int
		
	)
AS			
		BEGIN
		Update Assets Set
		
		GGXH=@GGXH,
		GZDate = @GZDate,
		Prices = @Prices,
		[Description] = @Description,
		DJUserName = @DJUserName,
		DJDate = @DJDate,
		NameId = @NameId,
		CategoryId = @CategoryId,
		[typeid]=(select [typeid] from [Assets_Names] where id=@NameId)		
		Where GId=@GId
		END	
						
INSERT INTO [zcjl]
           ([zcbh]
           ,[memo]
           ,[lrrq]
           ,[userid]
           ,[username])
     VALUES
           (@zcbh
           ,@memo
           ,GETDATE()
           ,@userid
           ,@username_1)			
	RETURN
